home *** CD-ROM | disk | FTP | other *** search
- <html>
- <head>
- <title>Class License - Evans Java Toolkit</title>
- <meta name="description" content="Evans Programming Java Toolkit - License Class">
- <meta name="keywords" content="license, epjava.lic, java, toolkit">
- <meta name="DESIGN" content="Evans Programming, Hoffman Estates, IL">
- </head>
-
- <body bgcolor="#FFFFFF" link="#FF0000" vlink="#800000" alink="#FF00FF">
-
- <!--INCLUDESTART="JTCLSHDR.TXT"-->
- <center>
- <font face="Arial" size="5" color="0000FF">
- <strong>Evans Programming Java Toolkit</strong><br>
- </font>
- </center>
-
- <center>
- <font size="-2" face="Arial" color="FF0000">
- <strong>
- <a href="../jtkit.htm", target="_top">Java Toolkit Page</a> |
- <a href="../softwr.htm", target="_top">Software</a> |
- <a href="../index.html", target="_top">Home</a><br>
- </strong>
- </font>
- </center>
- <!--INCLUDESTOP="JTCLSHDR.TXT"-->
- <!--INCLUDESTART="JTPGIDX.TXT"-->
- <center>
- <font size="-2" face="Arial" color="FF0000">
- <strong>
- <a href="#DESCRIPTION">Description</a> |
- <a href="#EXAMPLES">Examples</a> |
- <a href="#CONSTRUCTORS">Constructors</a> |
- <a href="#METHODS">Methods</a>
- </strong>
- </font>
- </center>
- <!--INCLUDESTOP="JTPGIDX.TXT"-->
- <!--INCLUDESTART="JTPGNAV.TXT"-->
-
-
- <a href="eplicexe.htm">Previous</a>
- <a href="classidx.htm">Next</a>
- <a href="classidx.htm">Index</a><br>
-
- <!--INCLUDESTOP="JTPGNAV.TXT"-->
-
- <hr>
- <h1>Class License</h1>
-
- <pre>
- public class evans.toolkit.<strong>License</strong>
- {
- // Constructors
- public <strong>License</strong>()
-
- // Methods
- public boolean <strong>registerLic</strong>(URL url)
- }</pre>
-
- <hr>
- <a name="DESCRIPTION"><img src="descript.gif" width=220 height=60 alt="Description"></a>
-
- <p>
- The <strong>License</strong> Class must be incorporated into your program or the Java
- Toolkit features will not function (the only exception to this is during the shareware
- versions' trial period). Using the License class is very simple as demonstrated in
- the <a href="#EXAMPLES">example</a> below.
- </p>
-
- <p>
- <strong>Note:</strong> During a trial period you can implement the <strong>License()</strong>
- class without actually having an <a href="license.htm">epjava.lic</a> file as long as the license <a href="#METHODS">location</a> is valid.
- It is recommended that you implement the <strong>License()</strong> class even
- during the trial period.
- </p>
-
- <p>
- The advantage to using the <strong>License()</strong> class from the start is that when changing from a trial to a registered version
- of the Toolkit, all you have to do is to place a valid epjava.lic file in the location specified
- in your code.
- </p>
-
- <p>
- <strong>IMPORTANT!</strong> The <strong>License.class</strong> file must always be present
- with your other Evans Java Toolkit classes or the Toolkit classes will not function!
- This is true whether you are using a trial, registered or commercial version of the toolkit!
- </p>
-
- <hr>
- <a name="EXAMPLES"><img src="example.gif" width=220 height=60 alt="Example"></a>
-
- <h3>Hard Coded License Directory</h3>
- <pre>
- // License location is "http://www.myserver.com/eplicense"
- import java.applet.*;
- import java.net.*;
- import evans.toolkit.*;
-
- public class MyNewClass
- {
- // Create url pointing to license location
- private URL urlLicLocation = new
- URL("http://www.myserver.com/eplicense");
-
- public void init()
- {
- // Create license object
- License lic = new License();
-
- // Register license location - returns true if valid epjava.lic at
- // urlLicLocation - also returns true if within a trial period
- if (lic.registerLic(urlLicLocation) == true)
- {
- // Now you can use any of the Evans Programming Toolkit classes.
- }
- }
- }
- </pre>
-
- <a name="GETDOCBASE">
- <h3>Soft Coded License Directory - Preferred Method</h3>
- </a>
- <pre>
- // One license is in an "eplicense" directory, located below the
- // HTML directory on the development hard drive. One license is
- // in an "eplicense" directory, located below the HTML directory
- // on the web server.
- import java.applet.*;
- import java.net.*;
- import evans.toolkit.*;
-
- public class MyNewClass
- {
- // Create url pointing to license location
- private URL urlLicLocation = new URL(getDocumentBase(), "eplicense");
-
- public void init()
- {
- // Create license object
- License lic = new License();
-
- // Register license location - returns true if valid epjava.lic at
- // urlLicLocation - also returns true if within a trial period
- if (lic.registerLic(urlLicLocation) == true)
- {
- // Now you can use any of the Evans Programming Toolkit classes.
- }
- }
- }</pre>
-
- <hr>
-
- <a name="CONSTRUCTORS"><img src="constrct.gif" width=220 height=60 alt="Constructors"></a>
-
- <dl>
- <dt><h3>License</h3>
- <dl>
- <dt><code>public <strong>License</strong>();</code>
- </dl>
- <dd><p>Creates a <strong>License</strong> object.</p>
- </dl>
-
- <hr>
- <a name="METHODS"><img src="methods.gif" width=220 height=60 alt="Methods"></a>
-
- <dl>
- <dt><h3>registerLic</h3>
- <dd><code>String <strong>registerLic</strong>(URL url);</code>
- <dd><p>Specifies the location of the epjava.lic license file. <strong>Do not
- include the license name (epjava.lic) in your url</strong>, only the license location!</p>
-
- <p>Returns true if within the allowable trial period or if the <a href="license.htm">epjava.lic</a>
- file was validated.</p>
-
- <p><strong>IMPORTANT!</strong> This method must be called before any references are made to the Evans Java Toolkit!
- Once this method returns true, it does not need called again as long as the applet
- is running.</p>
- <dl>
- <dt><h4>Parameters:</h4>
- <dd><strong>url</strong> - URL - The location of the epjava.lic file.
- </dl>
- <p></p>
-
- <dl>
- <dt><h4>Notes:</h4>
- <dd><p>Clever use of the <a href="#GETDOCBASE">getDocumentBase()</a> or getCodeBase() methods, instead of hard-coding the license
- location, will allow your applet to easily run on your development system and web server without requiring
- any changes.</p>
- </dl>
- </dl>
-
- <hr>
-
- <!--INCLUDESTART="JTPGNAV.TXT"-->
-
-
- <a href="eplicexe.htm">Previous</a>
- <a href="classidx.htm">Next</a>
- <a href="classidx.htm">Index</a><br>
-
- <!--INCLUDESTOP="JTPGNAV.TXT"-->
- <!--INCLUDESTART="JTPGIDX.TXT"-->
- <center>
- <font size="-2" face="Arial" color="FF0000">
- <strong>
- <a href="#DESCRIPTION">Description</a> |
- <a href="#EXAMPLES">Examples</a> |
- <a href="#CONSTRUCTORS">Constructors</a> |
- <a href="#METHODS">Methods</a>
- </strong>
- </font>
- </center>
- <!--INCLUDESTOP="JTPGIDX.TXT"-->
- <!--INCLUDESTART="JTCLSFTR.TXT"-->
- <center>
- <font size="-2" face="Arial" color="FF0000">
- <strong>
- <a href="../jtkit.htm", target="_top">Java Toolkit Page</a> |
- <a href="../softwr.htm", target="_top">Software</a> |
- <a href="../index.html", target="_top">Home</a><br>
- </strong>
- </font>
- </center>
-
- <p></p>
- <font size="-1">Evans Programming Java Toolkit HTML Document<br>
- Generated March 15, 1998<br>
- Revised Februrary 5, 1999<br>
- Copyright 1998-1999 Evans Programming<br>
- Send comments or corrections to <a href="mailto:davidLevans@megsinet.net">davidLevans@megsinet.net</a>
- </font>
- <!--INCLUDESTOP="JTCLSFTR.TXT"-->
-
- </body>
- </html>
-